Changed an .any() call with double negatives into a more readable .all().
authorJames Bendig <jbendig@starbytesoftware.com>
Fri, 10 Feb 2017 18:59:39 +0000 (12:59 -0600)
committerJames Bendig <jbendig@starbytesoftware.com>
Fri, 10 Feb 2017 18:59:39 +0000 (12:59 -0600)
src/cargo/ops/cargo_compile.rs

index 27b8610293faf2a180205e51e9954bf0ef0b0d44..fdacc1e446ebb42d4e5bd5f70271978c81730822 100644 (file)
@@ -435,7 +435,7 @@ fn generate_targets<'a>(pkg: &'a Package,
     let mut compatible_targets = Vec::with_capacity(targets.len());
     for (target, profile) in targets.drain(0..) {
         if target.is_lib() || match target.required_features() {
-            Some(f) => !f.iter().any(|f| !features.contains(f)),
+            Some(f) => f.iter().all(|f| features.contains(f)),
             None => true,
         } {
             compatible_targets.push((target, profile));